<template>
	<van-nav-bar 
		class="myhead" 
		custom-style="background:#07C160;" 
	>
		<template #left>
			<slot name="left">
				<view v-if="!noback" class="back" @click="gotoback" >
					<van-icon name="arrow-left" />
					<text>
					    返回
					</text>
				</view>
			</slot>
		</template>
		<template #title>
			 <view  style="color:#fff" v-if="title" class="head-title van-nav-bar__title van-ellipsis "> {{ title  }}</view>
		</template>
		<template #right>
			
		</template>
	</van-nav-bar>
</template>

<script lang="ts" setup>
defineProps({
	title:String,
	noback:Boolean,  
})
const gotoback = ()=>{
	uni.navigateBack({})
}
</script>

<style lang="scss">
	.myhead {
		background: #07C160 !important;
		position: fixed;
		width: 100%;
		top: 0;
		left: 0;
		z-index: 1000;
		color:#fff;
		.head-title {
			color: #fff !important;
			font-size: 28rpx !important;
			font-weight: 500;
		}

		.back {
			color: #fff;
		}
	}
</style>
